package com.example.mybatis.dao;
import com.example.mybatis.form.UserForm;
import com.example.mybatis.model.UserTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;


@Repository
public interface IUserDao {

    UserTO queryUsersByAccount(@Param("userAccount")String userAccount);

    /**
     *
     * @param startIndex
     * @param pageSize
     * @return
     */
    List<UserTO> selectAllUser(@Param("startIndex") int startIndex,@Param("pageSize") int pageSize);

    void addUserInfo(UserTO userTO);

    void updateUserInfo(UserTO userTO);

    void batchAddUserInfo(List<UserTO> userItems);

    List<String> queryExistUserAccounts(List<String> userAccounts);

    int queryTotalRows(@Param("dbName") String dbName);

    void batchUpdateUserInfo(List<UserTO> userItems);

    void deleteUserInfo(String userAccount);

    void batchDeleteUserInfo(List<String> userAccounts);

    List<UserTO> searchUsers(UserForm userForm);


}
